/*
 * Copyright 2025 New Vector Ltd.
 *
 * SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
 * Please see LICENSE files in the repository root for full details.
 */

.mx_RoomListSearch {
    /* From figma, this should be aligned with the room header */
    flex: 0 0 64px;
    box-sizing: border-box;
    border-bottom: var(--cpd-border-width-1) solid var(--cpd-color-bg-subtle-primary);
    padding: 0 var(--cpd-space-3x);

    .mx_RoomListSearch_search {
        /* The search button should take all the remaining space */
        flex: 1;
        font: var(--cpd-font-body-md-regular);
        color: var(--cpd-color-text-secondary);
        min-width: 0;

        svg {
            fill: var(--cpd-color-icon-secondary);
        }

        span {
            flex: 1;

            kbd {
                font-family: inherit;
            }

            /* Shrink and truncate the search text */
            white-space: nowrap;
            overflow: hidden;
            .mx_RoomListSearch_search_text {
                min-width: 0;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
                text-align: start;
            }
        }
    }
}
